#include<opencv2/opencv.hpp>
#include<iostream>
using namespace cv;
using namespace std;

 int main()
{
Mat image;
string path = "/home/lwj/opencv_projeci/2.png";
image = imread(path);
Mat imgGray ,imgBW ,imgHSV;
cvtColor(image, imgGray, COLOR_BGR2GRAY);
cvtColor(image, imgHSV, COLOR_BGR2HSV); 
threshold(imgGray, imgHSV, 100, 255, THRESH_BINARY);
imshow("RGB", image);
imshow("Gray", imgGray);
imshow("BW", imgBW);
imshow("HSV", imgHSV);
waitKey(0);
return 0;
}